package com.jesper.seckill.service.mq;

import com.jesper.seckill.service.IGoodsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class MQMessageConsumeService {

    @Autowired
    private IGoodsService goodsService;

    /**
     * 用户商品秒杀成功 - 消费队列信息
     */
    public void consumeSeckillMessage(String message) {
        try {
            goodsService.consumeSeckillMessage(message);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
